

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>Bills and Resolutions API &mdash; Open Legislation 2.0-alpha documentation</title>
  

  
  
  
  

  

  
  
    

  

  
  
    <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  

  

  
        <link rel="index" title="Index"
              href="genindex.html"/>
        <link rel="search" title="Search" href="search.html"/>
    <link rel="top" title="Open Legislation 2.0-alpha documentation" href="index.html"/>
        <link rel="next" title="Senate Calendar API" href="calendars.html"/>
        <link rel="prev" title="Open Legislation v2.0 API Docs" href="index.html"/> 

  
  <script src="_static/js/modernizr.min.js"></script>

</head>

<body class="wy-body-for-nav" role="document">

   
  <div class="wy-grid-for-nav">

    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search">
          

          
            <a href="reference.html" class="icon icon-home"> Open Legislation
          

          
          </a>

          
            
            
              <div class="version">
                2.0
              </div>
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="index.html"><strong>Open Legislation v2.0 API Docs</strong></a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#"><strong>Bills and Resolutions API</strong></a><ul>
<li class="toctree-l2"><a class="reference internal" href="#get-a-single-bill">Get a single bill</a></li>
<li class="toctree-l2"><a class="reference internal" href="#get-pdf-of-bill-text">Get PDF of bill text</a></li>
<li class="toctree-l2"><a class="reference internal" href="#get-a-list-of-bills">Get a list of bills</a></li>
<li class="toctree-l2"><a class="reference internal" href="#search-for-bills">Search for bills</a></li>
<li class="toctree-l2"><a class="reference internal" href="#get-bill-updates">Get bill updates</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="calendars.html"><strong>Senate Calendar API</strong></a></li>
<li class="toctree-l1"><a class="reference internal" href="agendas.html"><strong>Senate Agenda API</strong></a></li>
<li class="toctree-l1"><a class="reference internal" href="committees.html"><strong>Senate Committee API</strong></a></li>
<li class="toctree-l1"><a class="reference internal" href="laws.html"><strong>NYS Laws API</strong></a></li>
<li class="toctree-l1"><a class="reference internal" href="transcripts_floor.html"><strong>Senate Floor Transcripts API</strong></a></li>
<li class="toctree-l1"><a class="reference internal" href="transcripts_ph.html"><strong>Public Hearing Transcripts API</strong></a></li>
<li class="toctree-l1"><a class="reference internal" href="members.html"><strong>Senate Members API</strong></a></li>
<li class="toctree-l1"><a class="reference internal" href="agg_updates.html"><strong>Aggregate Updates API</strong></a></li>
<li class="toctree-l1"><a class="reference internal" href="search_api.html"><strong>Search APIs</strong></a></li>
</ul>

            
          
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="reference.html">Open Legislation</a>
        
      </nav>


      
      <div class="wy-nav-content">
        <div class="rst-content">
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="reference.html">Docs</a> &raquo;</li>
        
      <li><strong>Bills and Resolutions API</strong></li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            <a href="_sources/bills.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="bills-and-resolutions-api">
<h1><strong>Bills and Resolutions API</strong><a class="headerlink" href="#bills-and-resolutions-api" title="Permalink to this headline">¶</a></h1>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">While bills and resolutions serve different purposes, in the context of these docs, the term &#8216;bill&#8217; will include resolutions as well since the API request/response structure for both are identical.</p>
</div>
<hr class="docutils" />
<div class="section" id="get-a-single-bill">
<h2>Get a single bill<a class="headerlink" href="#get-a-single-bill" title="Permalink to this headline">¶</a></h2>
<p><strong>Usage</strong></p>
<p>Retrieve bill by session year and print no</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="p">(</span><span class="n">GET</span><span class="p">)</span> <span class="o">/</span><span class="n">api</span><span class="o">/</span><span class="mi">3</span><span class="o">/</span><span class="n">bills</span><span class="o">/</span><span class="p">{</span><span class="n">sessionYear</span><span class="p">}</span><span class="o">/</span><span class="p">{</span><span class="n">printNo</span><span class="p">}</span>
</pre></div>
</div>
<p><strong>Optional Params</strong></p>
<table border="1" class="docutils">
<colgroup>
<col width="11%" />
<col width="89%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Parameter</th>
<th class="head">Values</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>view</td>
<td>&#8216;default&#8217;, &#8216;info&#8217;, &#8216;no_fulltext&#8217;, &#8216;only_fulltext&#8217;, &#8216;with_refs&#8217;, &#8216;with_refs_no_fulltext&#8217;</td>
</tr>
<tr class="row-odd"><td>version</td>
<td>If view=only_fulltext, use the version to specify the amendment letter, e.g. version=A</td>
</tr>
</tbody>
</table>
<p>View options</p>
<table border="1" class="docutils">
<colgroup>
<col width="18%" />
<col width="82%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">View type</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>default</td>
<td>If the view param is omitted, the default response will be as documented below.</td>
</tr>
<tr class="row-odd"><td>info</td>
<td>If you only need a bill summary, i.e. no full text, memo, or vote data.</td>
</tr>
<tr class="row-even"><td>no_fulltext</td>
<td>Identical to the default response except the full text will be omitted.</td>
</tr>
<tr class="row-odd"><td>only_fulltext</td>
<td>If you only need the full text for a bill. Use the version param if needed.</td>
</tr>
<tr class="row-even"><td>with_refs</td>
<td>If you need basic info views included for any related bills (e.g. same as bills).</td>
</tr>
<tr class="row-odd"><td>&#160;</td>
<td>with_refs_no_fulltext is the same as above, just without any full text.</td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Bills typically get amended and their print no gets suffixed with an amendment letter (e.g. S1234B). The bill API returns bill responses that contain every amendment version so you should just provide
the base print no (e.g. S1234).</p>
</div>
<p><strong>Examples</strong></p>
<p>Request bill S2180 of session year 2013</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="o">/</span><span class="n">api</span><span class="o">/</span><span class="mi">3</span><span class="o">/</span><span class="n">bills</span><span class="o">/</span><span class="mi">2013</span><span class="o">/</span><span class="n">S2180</span>
</pre></div>
</div>
<p>Request summary of bill A450 of session year 2013</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>/api/3/bills/2013/A450?view=info
</pre></div>
</div>
<p id="bill-response"><strong>Response</strong></p>
<p>Default Bill Response</p>
<div class="highlight-javascript"><div class="highlight"><pre><span></span><span class="p">{</span>
   <span class="s2">&quot;success&quot;</span><span class="o">:</span> <span class="kc">true</span><span class="p">,</span>                            <span class="c1">// Indicates if bill was found</span>
   <span class="s2">&quot;message&quot;</span><span class="o">:</span> <span class="s2">&quot;Data for bill S2180-2013&quot;</span><span class="p">,</span>      <span class="c1">// Response description</span>
   <span class="s2">&quot;responseType&quot;</span><span class="o">:</span> <span class="s2">&quot;bill&quot;</span><span class="p">,</span>                     <span class="c1">// Response data type</span>
   <span class="s2">&quot;result&quot;</span><span class="o">:</span>
   <span class="p">{</span>                                           <span class="c1">// Actual data of bill contained in &#39;result&#39;</span>
   <span class="s2">&quot;basePrintNo&quot;</span><span class="o">:</span> <span class="s2">&quot;S2180&quot;</span><span class="p">,</span>                     <span class="c1">// Print no of bill (not including amendment version)</span>
   <span class="s2">&quot;session&quot;</span><span class="o">:</span> <span class="mi">2013</span><span class="p">,</span>                            <span class="c1">// Session year bill is active in</span>
   <span class="s2">&quot;printNo&quot;</span><span class="o">:</span> <span class="s2">&quot;S2180&quot;</span><span class="p">,</span>                         <span class="c1">// Print no of bill (may include amendment version)</span>
   <span class="s2">&quot;billType&quot;</span><span class="o">:</span> <span class="p">{</span>
     <span class="s2">&quot;chamber&quot;</span><span class="o">:</span> <span class="s2">&quot;SENATE&quot;</span><span class="p">,</span>                      <span class="c1">// Which chamber the bill was introduced (SENATE or ASSEMBLY)</span>
     <span class="s2">&quot;desc&quot;</span><span class="o">:</span> <span class="s2">&quot;Senate&quot;</span><span class="p">,</span>                         <span class="c1">// Type of bill</span>
     <span class="s2">&quot;resolution&quot;</span><span class="o">:</span> <span class="kc">false</span>                       <span class="c1">// True if this is a resolution</span>
   <span class="p">},</span>
   <span class="s2">&quot;title&quot;</span><span class="o">:</span> <span class="s2">&quot;Provides enhanced..&quot;</span><span class="p">,</span>             <span class="c1">// Title of the bill</span>
   <span class="s2">&quot;activeVersion&quot;</span><span class="o">:</span> <span class="s2">&quot;&quot;</span><span class="p">,</span>                        <span class="c1">// Current amendment version (&quot;&quot; for initial version)</span>
   <span class="s2">&quot;year&quot;</span><span class="o">:</span> <span class="mi">2013</span><span class="p">,</span>                               <span class="c1">// Year the bill was introduced on</span>
   <span class="s2">&quot;publishedDateTime&quot;</span><span class="o">:</span> <span class="s2">&quot;2013-01-14T10:36:22&quot;</span><span class="p">,</span> <span class="c1">// Date/Time this bill was first published via LBDC</span>
   <span class="s2">&quot;substitutedBy&quot;</span><span class="o">:</span> <span class="p">{</span>                          <span class="c1">// If the bill was substituted, the bill id will be contained</span>
     <span class="s2">&quot;basePrintNo&quot;</span><span class="o">:</span> <span class="s2">&quot;A1989&quot;</span><span class="p">,</span>                   <span class="c1">// The base print no of the substituted bill</span>
     <span class="s2">&quot;session&quot;</span><span class="o">:</span> <span class="mi">2013</span>                           <span class="c1">// Session year of the substituted bill</span>
   <span class="p">},</span>
   <span class="s2">&quot;sponsor&quot;</span><span class="o">:</span> <span class="p">{</span>                                <span class="c1">// Contains sponsor information</span>
     <span class="s2">&quot;member&quot;</span><span class="o">:</span> <span class="p">{</span>                               <span class="c1">// Contains sponsor member details (can be null)</span>
       <span class="s2">&quot;memberId&quot;</span><span class="o">:</span> <span class="mi">422</span><span class="p">,</span>                        <span class="c1">// Id of the sponsor</span>
       <span class="s2">&quot;shortName&quot;</span><span class="o">:</span> <span class="s2">&quot;GOLDEN&quot;</span><span class="p">,</span>                  <span class="c1">// Last name of sponsor (unique within a session year)</span>
       <span class="s2">&quot;sessionYear&quot;</span><span class="o">:</span> <span class="mi">2013</span><span class="p">,</span>                    <span class="c1">// Session year this sponsor was active in</span>
       <span class="s2">&quot;fullName&quot;</span><span class="o">:</span> <span class="s2">&quot;Martin J. Golden&quot;</span><span class="p">,</span>         <span class="c1">// Full name of sponsor</span>
       <span class="s2">&quot;districtCode&quot;</span><span class="o">:</span> <span class="mi">22</span>                      <span class="c1">// Legislative district code of this sponsor</span>
     <span class="p">},</span>
     <span class="s2">&quot;budget&quot;</span><span class="o">:</span> <span class="kc">false</span><span class="p">,</span>                          <span class="c1">// True if this is a budget bill</span>
     <span class="s2">&quot;rules&quot;</span><span class="o">:</span> <span class="kc">false</span>                            <span class="c1">// True if this bill was sponsored by the rules committee</span>
   <span class="p">},</span>
   <span class="s2">&quot;summary&quot;</span><span class="o">:</span> <span class="s2">&quot;Provides enhanced sentence...&quot;</span><span class="p">,</span> <span class="c1">// Summary of the bill</span>
   <span class="s2">&quot;signed&quot;</span><span class="o">:</span> <span class="kc">false</span><span class="p">,</span>                            <span class="c1">// True if this bill has been signed or adopted (if its a resolution)</span>
   <span class="s2">&quot;status&quot;</span><span class="o">:</span> <span class="p">{</span>                                 <span class="c1">// Status Information of the bill</span>
     <span class="s2">&quot;statusType&quot;</span><span class="o">:</span> <span class="s2">&quot;IN_SENATE_COMM&quot;</span><span class="p">,</span>           <span class="c1">// Status Code</span>
     <span class="s2">&quot;statusDesc&quot;</span><span class="o">:</span> <span class="s2">&quot;In Senate Committee&quot;</span><span class="p">,</span>      <span class="c1">// Description of status code</span>
     <span class="s2">&quot;actionDate&quot;</span><span class="o">:</span> <span class="s2">&quot;2014-06-20&quot;</span><span class="p">,</span>               <span class="c1">// Date when this status was updated</span>
     <span class="s2">&quot;committeeName&quot;</span><span class="o">:</span> <span class="s2">&quot;RULES&quot;</span><span class="p">,</span>                 <span class="c1">// If the bill is in a committee, the committee name is shown here</span>
     <span class="s2">&quot;billCalNo&quot;</span><span class="o">:</span> <span class="kc">null</span>                         <span class="c1">// If the bill is on the floor, the calendar number of the bill is shown here.</span>
   <span class="p">},</span>
   <span class="s2">&quot;milestones&quot;</span><span class="o">:</span> <span class="p">{</span>                             <span class="c1">// The milestones list contains a list of statuses (same structure</span>
     <span class="s2">&quot;items&quot;</span><span class="o">:</span> <span class="p">[</span>                                <span class="c1">// as the &#39;status&#39; object above.</span>
       <span class="p">{</span>
         <span class="s2">&quot;statusType&quot;</span><span class="o">:</span> <span class="s2">&quot;IN_SENATE_COMM&quot;</span><span class="p">,</span>
         <span class="s2">&quot;statusDesc&quot;</span><span class="o">:</span> <span class="s2">&quot;In Senate Committee&quot;</span><span class="p">,</span>
         <span class="s2">&quot;actionDate&quot;</span><span class="o">:</span> <span class="s2">&quot;2014-06-20&quot;</span><span class="p">,</span>
         <span class="s2">&quot;committeeName&quot;</span><span class="o">:</span> <span class="s2">&quot;RULES&quot;</span><span class="p">,</span>
         <span class="s2">&quot;billCalNo&quot;</span><span class="o">:</span> <span class="kc">null</span>
       <span class="p">}</span>
     <span class="p">],</span>
     <span class="s2">&quot;size&quot;</span><span class="o">:</span> <span class="mi">1</span>
   <span class="p">},</span>
   <span class="s2">&quot;programInfo&quot;</span><span class="o">:</span> <span class="p">{</span>                            <span class="c1">// Some bills are introduced as part of a program by the governor or an agency</span>
     <span class="s2">&quot;name&quot;</span><span class="o">:</span> <span class="s2">&quot;Department of Motor Vehicles&quot;</span><span class="p">,</span>   <span class="c1">// The name of the program/agency</span>
     <span class="s2">&quot;sequenceNo&quot;</span><span class="o">:</span> <span class="mi">2</span>                           <span class="c1">// The position of this bill within that program/agency list</span>
   <span class="p">},</span>
   <span class="c1">// ---- Bill summary view ends here --- //</span>
   <span class="s2">&quot;amendments&quot;</span><span class="o">:</span> <span class="p">{</span>                              <span class="c1">// Contains info specific to an amendment (base version is &quot;&quot;)</span>
     <span class="s2">&quot;items&quot;</span><span class="o">:</span> <span class="p">{</span>
       <span class="s2">&quot;&quot;</span><span class="o">:</span> <span class="p">{</span>                                   <span class="c1">// Map of Amendment versions</span>
         <span class="s2">&quot;basePrintNo&quot;</span><span class="o">:</span> <span class="s2">&quot;S2180&quot;</span><span class="p">,</span>               <span class="c1">// Bill print no/session details duplicated here</span>
         <span class="s2">&quot;session&quot;</span><span class="o">:</span> <span class="mi">2013</span><span class="p">,</span>
         <span class="s2">&quot;printNo&quot;</span><span class="o">:</span> <span class="s2">&quot;S2180&quot;</span><span class="p">,</span>
         <span class="s2">&quot;version&quot;</span><span class="o">:</span> <span class="s2">&quot;&quot;</span><span class="p">,</span>                        <span class="c1">// Amendment version</span>
         <span class="s2">&quot;publishDate&quot;</span><span class="o">:</span> <span class="s2">&quot;2013-01-14&quot;</span><span class="p">,</span>          <span class="c1">// Date this amendment was published</span>
         <span class="s2">&quot;sameAs&quot;</span><span class="o">:</span> <span class="p">{</span>                           <span class="c1">// List of bill that are identical to this within the same session year</span>
            <span class="s2">&quot;items&quot;</span><span class="o">:</span> <span class="p">[{</span>
               <span class="s2">&quot;basePrintNo&quot;</span><span class="o">:</span> <span class="s2">&quot;A2098&quot;</span><span class="p">,</span>
               <span class="s2">&quot;session&quot;</span><span class="o">:</span> <span class="mi">2013</span><span class="p">,</span>
               <span class="s2">&quot;printNo&quot;</span><span class="o">:</span> <span class="s2">&quot;A2098&quot;</span><span class="p">,</span>
               <span class="s2">&quot;version&quot;</span><span class="o">:</span> <span class="s2">&quot;&quot;</span>
            <span class="p">}],</span>
            <span class="s2">&quot;size&quot;</span><span class="o">:</span> <span class="mi">1</span>
         <span class="p">},</span>
         <span class="s2">&quot;memo&quot;</span><span class="o">:</span> <span class="s2">&quot;BILL NUMBER:S2180&quot;</span><span class="p">,</span>        <span class="c1">// The sponsor&#39;s memo which explains the bill. Only available for senate bills.</span>
         <span class="s2">&quot;lawSection&quot;</span><span class="o">:</span> <span class="s2">&quot;Penal Law&quot;</span><span class="p">,</span>            <span class="c1">// The primary section of law this bill impacts.</span>
         <span class="s2">&quot;lawCode&quot;</span><span class="o">:</span> <span class="s2">&quot;Add Â§265.18, Pen L&quot;</span><span class="p">,</span>     <span class="c1">// A code that states the actions being taken on specific portions of law.</span>
         <span class="s2">&quot;actClause&quot;</span><span class="o">:</span> <span class="s2">&quot;AN ACT to amend the..&quot;</span><span class="p">,</span> <span class="c1">// An Act to Clause</span>
         <span class="s2">&quot;fullText&quot;</span><span class="o">:</span> <span class="s2">&quot;...&quot;</span><span class="p">,</span>                    <span class="c1">// Full text of the bill amendment</span>
         <span class="s2">&quot;coSponsors&quot;</span><span class="o">:</span> <span class="p">{</span>                       <span class="c1">// List of co sponsors</span>
           <span class="s2">&quot;items&quot;</span><span class="o">:</span> <span class="p">[</span>
            <span class="p">{</span>
             <span class="s2">&quot;memberId&quot;</span><span class="o">:</span> <span class="mi">391</span><span class="p">,</span>
             <span class="s2">&quot;shortName&quot;</span><span class="o">:</span> <span class="s2">&quot;AVELLA&quot;</span><span class="p">,</span>
             <span class="s2">&quot;sessionYear&quot;</span><span class="o">:</span> <span class="mi">2013</span><span class="p">,</span>
             <span class="s2">&quot;fullName&quot;</span><span class="o">:</span> <span class="s2">&quot;Tony Avella&quot;</span><span class="p">,</span>
             <span class="s2">&quot;districtCode&quot;</span><span class="o">:</span> <span class="mi">11</span>
            <span class="p">}</span>
           <span class="p">],</span>
           <span class="s2">&quot;size&quot;</span><span class="o">:</span> <span class="mi">1</span>
         <span class="p">},</span>
         <span class="s2">&quot;multiSponsors&quot;</span><span class="o">:</span> <span class="p">{</span>                    <span class="c1">// List of multi sponsors (only for assembly bills)</span>
           <span class="s2">&quot;items&quot;</span><span class="o">:</span> <span class="p">[],</span>
           <span class="s2">&quot;size&quot;</span><span class="o">:</span> <span class="mi">0</span>
         <span class="p">},</span>
         <span class="s2">&quot;uniBill&quot;</span><span class="o">:</span> <span class="kc">false</span><span class="p">,</span>                     <span class="c1">// Indicates if this is a uni bill</span>
         <span class="s2">&quot;stricken&quot;</span><span class="o">:</span> <span class="kc">false</span>                     <span class="c1">// Indicates if this amendment has been stricken</span>
       <span class="p">}</span>
     <span class="p">},</span>
     <span class="s2">&quot;size&quot;</span><span class="o">:</span> <span class="mi">1</span>
   <span class="p">}</span>
   <span class="s2">&quot;votes&quot;</span><span class="o">:</span> <span class="p">{</span>                                  <span class="c1">// Votes will be stored here if there are any</span>
      <span class="s2">&quot;items&quot;</span><span class="o">:</span> <span class="p">[</span>
       <span class="p">{</span>
         <span class="s2">&quot;version&quot;</span><span class="o">:</span> <span class="s2">&quot;&quot;</span><span class="p">,</span>                        <span class="c1">// Amendment version vote was taken on</span>
         <span class="s2">&quot;voteType&quot;</span><span class="o">:</span> <span class="s2">&quot;COMMITTEE&quot;</span><span class="p">,</span>              <span class="c1">// Type of vote (COMMITTEE or FLOOR)</span>
         <span class="s2">&quot;voteDate&quot;</span><span class="o">:</span> <span class="s2">&quot;2013-04-22&quot;</span><span class="p">,</span>             <span class="c1">// Date the vote was taken</span>
         <span class="s2">&quot;committee&quot;</span><span class="o">:</span> <span class="p">{</span>                        <span class="c1">// If it was a committee vote, the committee will be shown here</span>
           <span class="s2">&quot;chamber&quot;</span><span class="o">:</span> <span class="s2">&quot;SENATE&quot;</span><span class="p">,</span>
           <span class="s2">&quot;name&quot;</span><span class="o">:</span> <span class="s2">&quot;Rules&quot;</span>
         <span class="p">},</span>
         <span class="s2">&quot;memberVotes&quot;</span><span class="o">:</span> <span class="p">{</span>                      <span class="c1">// The actual votes are shown here</span>
           <span class="s2">&quot;items&quot;</span><span class="o">:</span> <span class="p">{</span>
             <span class="s2">&quot;EXC&quot;</span><span class="o">:</span> <span class="p">{</span>                          <span class="c1">// Map by vote codes</span>
                <span class="s2">&quot;items&quot;</span><span class="o">:</span> <span class="p">[</span>                     <span class="c1">// List of members that voted with this code</span>
                  <span class="p">{</span>
                    <span class="s2">&quot;memberId&quot;</span><span class="o">:</span> <span class="mi">424</span><span class="p">,</span>
                    <span class="s2">&quot;shortName&quot;</span><span class="o">:</span> <span class="s2">&quot;HANNON&quot;</span><span class="p">,</span>
                    <span class="s2">&quot;sessionYear&quot;</span><span class="o">:</span> <span class="mi">2013</span>
                  <span class="p">}</span>
                <span class="p">],</span>
                 <span class="s2">&quot;size&quot;</span><span class="o">:</span> <span class="mi">1</span>
             <span class="p">},</span>
             <span class="s2">&quot;AYEWR&quot;</span><span class="o">:</span> <span class="p">{..},</span>                    <span class="c1">// Other votes truncated here for brevity</span>
             <span class="s2">&quot;NAY&quot;</span><span class="o">:</span> <span class="p">{..},</span>
             <span class="s2">&quot;AYE&quot;</span><span class="o">:</span> <span class="p">{..}</span>
           <span class="p">},</span>
           <span class="s2">&quot;size&quot;</span><span class="o">:</span> <span class="mi">4</span>
         <span class="p">}</span>
       <span class="p">},</span>
     <span class="p">],</span>
     <span class="s2">&quot;size&quot;</span><span class="o">:</span> <span class="mi">1</span>
   <span class="p">},</span>
   <span class="s2">&quot;vetoMessages&quot;</span> <span class="o">:</span> <span class="p">{</span>                          <span class="c1">// If a veto memo from the governor was sent, it will show up here</span>
       <span class="s2">&quot;items&quot;</span> <span class="o">:</span> <span class="p">[</span> <span class="p">{</span>
         <span class="s2">&quot;billId&quot;</span> <span class="o">:</span> <span class="p">{</span>                          <span class="c1">// Bill id replicated here</span>
           <span class="s2">&quot;basePrintNo&quot;</span> <span class="o">:</span> <span class="s2">&quot;A10049&quot;</span><span class="p">,</span>
           <span class="s2">&quot;session&quot;</span> <span class="o">:</span> <span class="mi">2013</span><span class="p">,</span>
           <span class="s2">&quot;printNo&quot;</span> <span class="o">:</span> <span class="s2">&quot;A10049&quot;</span><span class="p">,</span>
           <span class="s2">&quot;version&quot;</span> <span class="o">:</span> <span class="s2">&quot;&quot;</span>
         <span class="p">},</span>
         <span class="s2">&quot;year&quot;</span> <span class="o">:</span> <span class="mi">2014</span><span class="p">,</span>                        <span class="c1">// Year this veto was sent</span>
         <span class="s2">&quot;vetoNumber&quot;</span> <span class="o">:</span> <span class="mi">511</span><span class="p">,</span>                   <span class="c1">// Veto number (unique to a single year)</span>
         <span class="s2">&quot;memoText&quot;</span> <span class="o">:</span> <span class="s2">&quot;.....&quot;</span><span class="p">,</span>                 <span class="c1">// The content of the veto memo</span>
         <span class="s2">&quot;vetoType&quot;</span> <span class="o">:</span> <span class="s2">&quot;STANDARD&quot;</span><span class="p">,</span>              <span class="c1">// The type of veto</span>
         <span class="s2">&quot;chapter&quot;</span> <span class="o">:</span> <span class="mi">0</span><span class="p">,</span>                        <span class="c1">// The chapter (if applicable)</span>
         <span class="s2">&quot;billPage&quot;</span> <span class="o">:</span> <span class="mi">0</span><span class="p">,</span>                       <span class="c1">// For line vetos, a page number may be specified</span>
         <span class="s2">&quot;lineStart&quot;</span> <span class="o">:</span> <span class="mi">0</span><span class="p">,</span>
         <span class="s2">&quot;lineEnd&quot;</span> <span class="o">:</span> <span class="mi">0</span><span class="p">,</span>
         <span class="s2">&quot;signer&quot;</span> <span class="o">:</span> <span class="s2">&quot;ANDREW M. CUOMO&quot;</span><span class="p">,</span>         <span class="c1">// Governor Name</span>
         <span class="s2">&quot;signedDate&quot;</span> <span class="o">:</span> <span class="kc">null</span>                   <span class="c1">// Date Signed (if present)</span>
       <span class="p">}</span> <span class="p">],</span>
       <span class="s2">&quot;size&quot;</span> <span class="o">:</span> <span class="mi">1</span>
   <span class="p">},</span>
   <span class="s2">&quot;approvalMessage&quot;</span><span class="o">:</span> <span class="p">{</span>                        <span class="c1">// Approval message from the governor (if present)</span>
      <span class="s2">&quot;billId&quot;</span><span class="o">:</span> <span class="p">{</span>                              <span class="c1">// Bill id the approval message was sent for</span>
         <span class="s2">&quot;basePrintNo&quot;</span><span class="o">:</span> <span class="s2">&quot;S6830&quot;</span><span class="p">,</span>
         <span class="s2">&quot;session&quot;</span><span class="o">:</span> <span class="mi">2013</span><span class="p">,</span>
         <span class="s2">&quot;printNo&quot;</span><span class="o">:</span> <span class="s2">&quot;S6830A&quot;</span><span class="p">,</span>
         <span class="s2">&quot;version&quot;</span><span class="o">:</span> <span class="s2">&quot;A&quot;</span>
      <span class="p">},</span>
      <span class="s2">&quot;year&quot;</span><span class="o">:</span> <span class="mi">2014</span><span class="p">,</span>                             <span class="c1">// Year this approval message was sent</span>
      <span class="s2">&quot;approvalNumber&quot;</span><span class="o">:</span> <span class="mi">11</span><span class="p">,</span>                     <span class="c1">// Approval number (unique to a single year)</span>
      <span class="s2">&quot;chapter&quot;</span><span class="o">:</span> <span class="mi">476</span><span class="p">,</span>                           <span class="c1">// The chapter (if applicable)</span>
      <span class="s2">&quot;signer&quot;</span><span class="o">:</span> <span class="s2">&quot;ANDREW M. CUOMO&quot;</span><span class="p">,</span>              <span class="c1">// Governor Name</span>
      <span class="s2">&quot;text&quot;</span><span class="o">:</span> <span class="s2">&quot;....&quot;</span>                            <span class="c1">// Text of the approval message</span>
   <span class="p">},</span>
   <span class="s2">&quot;additionalSponsors&quot;</span><span class="o">:</span> <span class="p">{</span>                      <span class="c1">// If there are additional sponsors, the members will be listed here</span>
      <span class="s2">&quot;items&quot;</span><span class="o">:</span> <span class="p">[],</span>
      <span class="s2">&quot;size&quot;</span><span class="o">:</span> <span class="mi">0</span>
   <span class="p">},</span>
   <span class="s2">&quot;pastCommittees&quot;</span><span class="o">:</span> <span class="p">{</span>                          <span class="c1">// Lists out all the committees this bill was in</span>
      <span class="s2">&quot;items&quot;</span><span class="o">:</span> <span class="p">[</span>
         <span class="p">{</span>
         <span class="s2">&quot;chamber&quot;</span><span class="o">:</span> <span class="s2">&quot;ASSEMBLY&quot;</span><span class="p">,</span>                 <span class="c1">// Committee Chamber</span>
         <span class="s2">&quot;name&quot;</span><span class="o">:</span> <span class="s2">&quot;GOVERNMENTAL OPERATIONS&quot;</span><span class="p">,</span>     <span class="c1">// Name of committee</span>
         <span class="s2">&quot;sessionYear&quot;</span><span class="o">:</span> <span class="mi">2013</span><span class="p">,</span>                   <span class="c1">// Session year it was referenced by the committee</span>
         <span class="s2">&quot;referenceDate&quot;</span><span class="o">:</span> <span class="s2">&quot;2014-06-10T00:00&quot;</span>    <span class="c1">// Date it was referenced by the committee</span>
         <span class="p">}],</span>
      <span class="s2">&quot;size&quot;</span><span class="o">:</span> <span class="mi">1</span>
   <span class="p">},</span>
   <span class="s2">&quot;actions&quot;</span><span class="o">:</span> <span class="p">{</span>                                 <span class="c1">// The actions that have occurred on a bill</span>
      <span class="s2">&quot;items&quot;</span><span class="o">:</span> <span class="p">[</span>
      <span class="p">{</span>
         <span class="s2">&quot;billId&quot;</span><span class="o">:</span> <span class="p">{</span>
            <span class="s2">&quot;basePrintNo&quot;</span><span class="o">:</span> <span class="s2">&quot;S6830&quot;</span><span class="p">,</span>
            <span class="s2">&quot;session&quot;</span><span class="o">:</span> <span class="mi">2013</span><span class="p">,</span>
            <span class="s2">&quot;printNo&quot;</span><span class="o">:</span> <span class="s2">&quot;S6830&quot;</span><span class="p">,</span>
            <span class="s2">&quot;version&quot;</span><span class="o">:</span> <span class="s2">&quot;&quot;</span>                       <span class="c1">// Specifies which amendment version of the bill the action affects</span>
         <span class="p">},</span>
         <span class="s2">&quot;date&quot;</span><span class="o">:</span> <span class="s2">&quot;2014-03-17&quot;</span><span class="p">,</span>                  <span class="c1">// Date of the action</span>
         <span class="s2">&quot;chamber&quot;</span><span class="o">:</span> <span class="s2">&quot;SENATE&quot;</span><span class="p">,</span>                   <span class="c1">// Chamber this action occurred in</span>
         <span class="s2">&quot;sequenceNo&quot;</span><span class="o">:</span> <span class="mi">1</span><span class="p">,</span>                       <span class="c1">// Number used to order the actions sequentially</span>
         <span class="s2">&quot;text&quot;</span><span class="o">:</span> <span class="s2">&quot;REFERRED TO INVESTIGATIONS..&quot;</span> <span class="c1">// The text describing the action</span>
      <span class="p">},</span>
      <span class="s2">&quot;size&quot;</span><span class="o">:</span> <span class="mi">1</span>
   <span class="p">},</span>
   <span class="s2">&quot;previousVersions&quot;</span><span class="o">:</span> <span class="p">{</span>                        <span class="c1">// Lists the previous versions of this bill from prior session years.</span>
      <span class="s2">&quot;items&quot;</span><span class="o">:</span> <span class="p">[</span>
         <span class="p">{</span>
         <span class="s2">&quot;basePrintNo&quot;</span><span class="o">:</span> <span class="s2">&quot;A1989&quot;</span><span class="p">,</span>                <span class="c1">// Bill id of the previous bill</span>
         <span class="s2">&quot;session&quot;</span><span class="o">:</span> <span class="mi">2013</span><span class="p">,</span>
         <span class="s2">&quot;printNo&quot;</span><span class="o">:</span> <span class="s2">&quot;A1989&quot;</span><span class="p">,</span>
         <span class="s2">&quot;version&quot;</span><span class="o">:</span> <span class="s2">&quot;&quot;</span>
         <span class="p">}</span>
      <span class="p">],</span>
      <span class="s2">&quot;size&quot;</span><span class="o">:</span> <span class="mi">1</span>
   <span class="p">},</span>
   <span class="s2">&quot;committeeAgendas&quot;</span><span class="o">:</span> <span class="p">{</span>                        <span class="c1">// If this bill was on a committee agenda, they will be referenced here</span>
      <span class="s2">&quot;items&quot;</span><span class="o">:</span> <span class="p">[</span>
      <span class="p">{</span>
        <span class="s2">&quot;agendaId&quot;</span><span class="o">:</span> <span class="p">{</span>                           <span class="c1">// Id of the agenda</span>
          <span class="s2">&quot;number&quot;</span><span class="o">:</span> <span class="mi">2</span><span class="p">,</span>
          <span class="s2">&quot;year&quot;</span><span class="o">:</span> <span class="mi">2013</span>
        <span class="p">},</span>
        <span class="s2">&quot;committeeId&quot;</span><span class="o">:</span> <span class="p">{</span>                        <span class="c1">// Id of the committee</span>
          <span class="s2">&quot;chamber&quot;</span><span class="o">:</span> <span class="s2">&quot;SENATE&quot;</span><span class="p">,</span>
          <span class="s2">&quot;name&quot;</span><span class="o">:</span> <span class="s2">&quot;Health&quot;</span>
        <span class="p">}</span>
      <span class="p">}],</span>
      <span class="s2">&quot;size&quot;</span><span class="o">:</span> <span class="mi">1</span>
   <span class="p">},</span>
   <span class="s2">&quot;calendars&quot;</span><span class="o">:</span> <span class="p">{</span>                               <span class="c1">// If the bill was on a senate calendar, the calendars will be</span>
      <span class="s2">&quot;items&quot;</span><span class="o">:</span> <span class="p">[</span>                                <span class="c1">// referenced here</span>
         <span class="p">{</span>
         <span class="s2">&quot;year&quot;</span><span class="o">:</span> <span class="mi">2013</span><span class="p">,</span>                          <span class="c1">// Calendar year</span>
         <span class="s2">&quot;calendarNumber&quot;</span><span class="o">:</span> <span class="mi">4</span>                    <span class="c1">// Calendar number</span>
         <span class="p">}</span>
      <span class="p">],</span>
      <span class="s2">&quot;size&quot;</span><span class="o">:</span> <span class="mi">1</span>
   <span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
<p>If <strong>view</strong> is set to &#8216;info&#8217;, the above response would be truncated after the &#8216;programInfo&#8217; block.</p>
<p>If <strong>view</strong> is set to &#8216;with_refs&#8217;, the default response will be returned with the following data appended:</p>
<div class="highlight-javascript"><div class="highlight"><pre><span></span><span class="s2">&quot;billInfoRefs&quot;</span><span class="o">:</span> <span class="p">{</span>                               <span class="c1">// Any bills that were referenced (e.g. same as, previous versions)</span>
  <span class="s2">&quot;items&quot;</span><span class="o">:</span> <span class="p">{</span>                                    <span class="c1">// will be mapped here using the basePrintNo-sessionYear as the key.</span>
    <span class="s2">&quot;A2098-2013&quot;</span><span class="o">:</span> <span class="p">{</span>
       <span class="c1">// &#39;Summary&#39; response for this bill</span>
       <span class="c1">// hidden here for brevity</span>
    <span class="p">}</span>
   <span class="p">}</span>
  <span class="s2">&quot;size&quot;</span><span class="o">:</span> <span class="mi">1</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<hr class="docutils" />
<div class="section" id="get-pdf-of-bill-text">
<h2>Get PDF of bill text<a class="headerlink" href="#get-pdf-of-bill-text" title="Permalink to this headline">¶</a></h2>
<p>If you just need a pdf of the latest full text of the bill, you can make the following request:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="p">(</span><span class="n">GET</span><span class="p">)</span> <span class="o">/</span><span class="n">api</span><span class="o">/</span><span class="mi">3</span><span class="o">/</span><span class="n">bills</span><span class="o">/</span><span class="p">{</span><span class="n">sessionYear</span><span class="p">}</span><span class="o">/</span><span class="p">{</span><span class="n">printNo</span><span class="p">}</span><span class="o">.</span><span class="n">pdf</span>
</pre></div>
</div>
<p>If the bill is found, a PDF will be generated with the full text of the bill.</p>
</div>
<hr class="docutils" />
<div class="section" id="get-a-list-of-bills">
<h2>Get a list of bills<a class="headerlink" href="#get-a-list-of-bills" title="Permalink to this headline">¶</a></h2>
<p><strong>Usage</strong></p>
<p>List bills within a session year</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="p">(</span><span class="n">GET</span><span class="p">)</span> <span class="o">/</span><span class="n">api</span><span class="o">/</span><span class="mi">3</span><span class="o">/</span><span class="n">bills</span><span class="o">/</span><span class="p">{</span><span class="n">sessionYear</span><span class="p">}</span>
</pre></div>
</div>
<p id="bill-listing-params"><strong>Optional Params</strong></p>
<table border="1" class="docutils">
<colgroup>
<col width="13%" />
<col width="23%" />
<col width="64%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Parameter</th>
<th class="head">Values</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>limit</td>
<td>1 - 1000</td>
<td>Number of results to return</td>
</tr>
<tr class="row-odd"><td>offset</td>
<td>&gt;= 1</td>
<td>Result number to start from</td>
</tr>
<tr class="row-even"><td>full</td>
<td>boolean</td>
<td>Set to true to see the full bill responses.</td>
</tr>
<tr class="row-odd"><td>idsOnly</td>
<td>boolean</td>
<td>Set to true to see only the printNo and session
for each bill.  (overrides &#8216;full&#8217; parameter)</td>
</tr>
<tr class="row-even"><td>sort</td>
<td>string</td>
<td>Sort by any field from the response.</td>
</tr>
</tbody>
</table>
<p><strong>Default Sort Order</strong></p>
<p>By default, (i.e. no sort param was included in the request)
the results will be in ascending order by the bill&#8217;s published date time (sort=publishedDateTime:DESC)</p>
<p><strong>Examples</strong></p>
<p>List 100 bills from 2013</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>/api/3/bills/2013?limit=100
</pre></div>
</div>
<p>List 100 complete bills starting from 101</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>/api/3/bills/2013?limit=100&amp;offset=101&amp;full=true
</pre></div>
</div>
<p>Sort by increasing published date</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>/api/3/bills/2013?sort=publishedDateTime:ASC
</pre></div>
</div>
<p>Sort by increasing status action date, (default)</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>/api/3/bills/2013?sort=status.actionDate:ASC
</pre></div>
</div>
<p><strong>Response</strong></p>
<div class="highlight-javascript"><div class="highlight"><pre><span></span><span class="p">{</span>
   <span class="s2">&quot;success&quot;</span><span class="o">:</span> <span class="kc">true</span><span class="p">,</span>                     <span class="c1">// True if the request was fine</span>
   <span class="s2">&quot;message&quot;</span><span class="o">:</span> <span class="s2">&quot;&quot;</span><span class="p">,</span>
   <span class="s2">&quot;responseType&quot;</span><span class="o">:</span> <span class="s2">&quot;bill-info list&quot;</span><span class="p">,</span>
   <span class="s2">&quot;total&quot;</span><span class="o">:</span> <span class="mi">25568</span><span class="p">,</span>                      <span class="c1">// Total bills in the listing</span>
   <span class="s2">&quot;offsetStart&quot;</span><span class="o">:</span> <span class="mi">1</span><span class="p">,</span>                    <span class="c1">// Offset value</span>
   <span class="s2">&quot;offsetEnd&quot;</span><span class="o">:</span> <span class="mi">50</span><span class="p">,</span>                     <span class="c1">// To paginate, set query param offset={offsetEnd + 1}</span>
   <span class="s2">&quot;limit&quot;</span><span class="o">:</span> <span class="mi">50</span><span class="p">,</span>                         <span class="c1">// Max number of results shown</span>
   <span class="s2">&quot;result&quot;</span><span class="o">:</span> <span class="p">{</span>
     <span class="s2">&quot;items&quot;</span><span class="o">:</span> <span class="p">[{</span> <span class="p">...</span> <span class="p">}],</span>                <span class="c1">// Array of bill responses (either summary or full view)</span>
     <span class="s2">&quot;size&quot;</span><span class="o">:</span> <span class="mi">50</span>
   <span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<hr class="docutils" />
<div class="section" id="search-for-bills">
<h2>Search for bills<a class="headerlink" href="#search-for-bills" title="Permalink to this headline">¶</a></h2>
<p>Read our <a class="reference internal" href="search_api.html"><span class="doc">search API docs</span></a> for info on how to construct search terms. The bill search index is comprised of full bill responses
(i.e. the json response returned when requesting a single bill) so query and sort strings will be based on that response
structure.</p>
<p><strong>Usage</strong></p>
<p>Search across all session years</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>(GET) /api/3/bills/search?term=YOUR_TERM
</pre></div>
</div>
<p>Search within a session year</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>(GET) /api/3/bills/{sessionYear}/search?term=YOUR_TERM
</pre></div>
</div>
<p><strong>Required Params</strong></p>
<table border="1" class="docutils">
<colgroup>
<col width="13%" />
<col width="23%" />
<col width="64%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Parameter</th>
<th class="head">Values</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>term</td>
<td>string</td>
<td>ElasticSearch query string</td>
</tr>
</tbody>
</table>
<p><strong>Optional Params</strong></p>
<p>Same as the <a class="reference internal" href="#bill-listing-params">bill listing params</a>.</p>
<p><strong>Examples</strong></p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">If you are querying a field that is heavily nested (like the amendment specific fields), prefix the field with a \*. This is a wildcard expression. E.g   ?term=\*memo:&#8217;Some phrase&#8217;</p>
</div>
<p>Search for a general term (matches against any data field)</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>(GET) /api/3/bills/search?term=Gun Control
</pre></div>
</div>
<p>Search for 2013 &#8216;resolutions&#8217;</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>(GET) /api/3/bills/2013/search?term=billType.resolution:true
</pre></div>
</div>
<p>Search for all bills and resolutions sponsored by a Senator, ordered by most recent status update</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>(GET) /api/3/bills/search?term=sponsor.member.shortName:BRESLIN&amp;sort=status.actionDate:DESC
</pre></div>
</div>
<p>Search for full text containing the phrase &#8216;Marriage Equality&#8217;. Note the use of the \* prefix to match full texts regardless of amendment version</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>(GET) /api/3/bills/search?term=\*.fullText:&quot;Marriage Equality&quot;
</pre></div>
</div>
<p>Search for bills that were published between a certain date range, ordered by increasing published date</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>(GET) /api/3/bills/2013/search?term=publishedDateTime:[2014-01-01 TO 2014-01-02]&amp;sort=publishedDateTime:ASC
</pre></div>
</div>
</div>
<hr class="docutils" />
<div class="section" id="get-bill-updates">
<h2>Get bill updates<a class="headerlink" href="#get-bill-updates" title="Permalink to this headline">¶</a></h2>
<p>To identify which bills have received updates within a given time period you can use the bill updates api.</p>
<p><strong>Usage</strong></p>
<p>List of bills updated during the given date/time range</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="o">/</span><span class="n">api</span><span class="o">/</span><span class="mi">3</span><span class="o">/</span><span class="n">bills</span><span class="o">/</span><span class="n">updates</span><span class="o">/</span><span class="p">{</span><span class="n">fromDateTime</span><span class="p">}</span><span class="o">/</span><span class="p">{</span><span class="n">toDateTime</span><span class="p">}</span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The fromDateTime and toDateTime should be formatted as the ISO Date Time format. For example December 10, 2014, 1:30:02 PM should be inputted as 2014-12-10T13:30:02. The fromDateTime and toDateTime range is exclusive.</p>
</div>
<p><strong>Optional Params</strong></p>
<table border="1" class="docutils">
<colgroup>
<col width="12%" />
<col width="25%" />
<col width="63%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Parameter</th>
<th class="head">Values</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>type</td>
<td>(processed|published)</td>
<td>The type of bill update (see below for explanation)</td>
</tr>
<tr class="row-odd"><td>detail</td>
<td>boolean</td>
<td>Set to true to see <a class="reference internal" href="#detailed-update-digests">detailed update digests</a></td>
</tr>
<tr class="row-even"><td>filter</td>
<td>string</td>
<td>Filter by update type. See <a class="reference internal" href="#update-filters">update filters</a></td>
</tr>
<tr class="row-odd"><td>order</td>
<td>string (asc|desc)</td>
<td>Order the results by update date/time</td>
</tr>
<tr class="row-even"><td>summary</td>
<td>boolean</td>
<td>Include a bill info response per item</td>
</tr>
</tbody>
</table>
<p>There are two types of updates, &#8216;processed&#8217; and &#8216;published&#8217;. Processed refers to the date that OpenLeg processed
the data which is useful if you are trying to stay synchronized with OpenLeg. Published refers to the date during
which data was intended to be published. This can differ from the processed date because OpenLeg can periodically
reprocess it&#8217;s data to fix issues. By default the type is set to &#8216;processed&#8217;.</p>
<p><strong>Examples</strong></p>
<p>Bills that were updated between November 1, 2014 and November 5, 2014</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="o">/</span><span class="n">api</span><span class="o">/</span><span class="mi">3</span><span class="o">/</span><span class="n">bills</span><span class="o">/</span><span class="n">updates</span><span class="o">/</span><span class="mi">2014</span><span class="o">-</span><span class="mi">11</span><span class="o">-</span><span class="mi">01</span><span class="n">T00</span><span class="p">:</span><span class="mi">00</span><span class="p">:</span><span class="mi">00</span><span class="o">/</span><span class="mi">2014</span><span class="o">-</span><span class="mi">11</span><span class="o">-</span><span class="mi">05</span><span class="n">T00</span><span class="p">:</span><span class="mi">00</span><span class="p">:</span><span class="mi">00</span>
</pre></div>
</div>
<p id="bill-update-token-response"><strong>Response (detail = false)</strong></p>
<div class="highlight-javascript"><div class="highlight"><pre><span></span><span class="p">{</span>
    <span class="s2">&quot;success&quot;</span><span class="o">:</span> <span class="kc">true</span><span class="p">,</span>
    <span class="s2">&quot;message&quot;</span><span class="o">:</span> <span class="s2">&quot;&quot;</span><span class="p">,</span>
    <span class="s2">&quot;responseType&quot;</span><span class="o">:</span> <span class="s2">&quot;base-bill-id-update-token list&quot;</span><span class="p">,</span>
    <span class="s2">&quot;total&quot;</span><span class="o">:</span> <span class="mi">4</span><span class="p">,</span>
    <span class="s2">&quot;offsetStart&quot;</span><span class="o">:</span> <span class="mi">1</span><span class="p">,</span>
    <span class="s2">&quot;offsetEnd&quot;</span><span class="o">:</span> <span class="mi">4</span><span class="p">,</span>
    <span class="s2">&quot;limit&quot;</span><span class="o">:</span> <span class="mi">50</span><span class="p">,</span>
    <span class="s2">&quot;result&quot;</span><span class="o">:</span> <span class="p">{</span>
        <span class="s2">&quot;items&quot;</span><span class="o">:</span> <span class="p">[</span>
            <span class="p">{</span>
                <span class="s2">&quot;id&quot;</span><span class="o">:</span> <span class="p">{</span>
                    <span class="s2">&quot;basePrintNo&quot;</span><span class="o">:</span> <span class="s2">&quot;A242&quot;</span><span class="p">,</span>
                    <span class="s2">&quot;session&quot;</span><span class="o">:</span> <span class="mi">2013</span>
                <span class="p">},</span>
                <span class="s2">&quot;sourceId&quot;</span><span class="o">:</span> <span class="s2">&quot;SOBI.D141103.T092258.TXT-0-BILL&quot;</span><span class="p">,</span>
                <span class="s2">&quot;sourceDateTime&quot;</span><span class="o">:</span> <span class="s2">&quot;2014-11-03T09:22:58&quot;</span><span class="p">,</span>
                <span class="s2">&quot;processedDateTime&quot;</span><span class="o">:</span> <span class="s2">&quot;2014-12-17T16:54:24.065500&quot;</span>
            <span class="p">},</span>
            <span class="p">...</span> <span class="p">(</span><span class="nx">truncated</span><span class="p">)</span>
<span class="p">}</span>
</pre></div>
</div>
<p id="update-filters">You can filter the results of the API by specifying a specific type of update you are interested in. For example you
may only want to know which bills have had status updates, or which bills had full text changes.</p>
<p>Update Filters:</p>
<table border="1" class="docutils">
<colgroup>
<col width="33%" />
<col width="67%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Field</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>ACT_CLAUSE</td>
<td>The enacting clause</td>
</tr>
<tr class="row-odd"><td>ACTION</td>
<td>Bill Actions</td>
</tr>
<tr class="row-even"><td>ACTIVE_VERSION</td>
<td>Active amendment version</td>
</tr>
<tr class="row-odd"><td>APPROVAL</td>
<td>Approval Memos</td>
</tr>
<tr class="row-even"><td>COSPONSOR</td>
<td>Co/sponsor changes</td>
</tr>
<tr class="row-odd"><td>FULLTEXT</td>
<td>Bill full text</td>
</tr>
<tr class="row-even"><td>LAW</td>
<td>Law code and primary sections</td>
</tr>
<tr class="row-odd"><td>MEMO</td>
<td>Sponsor memos</td>
</tr>
<tr class="row-even"><td>MULTISPONSOR</td>
<td>Multi-sponsor changes</td>
</tr>
<tr class="row-odd"><td>SPONSOR</td>
<td>Sponsor changes</td>
</tr>
<tr class="row-even"><td>STATUS</td>
<td>Bill status updates</td>
</tr>
<tr class="row-odd"><td>STATUS_CODE</td>
<td>Bill status &#8216;code&#8217; updates</td>
</tr>
<tr class="row-even"><td>SUMMARY</td>
<td>Bill summary</td>
</tr>
<tr class="row-odd"><td>TITLE</td>
<td>Bill title</td>
</tr>
<tr class="row-even"><td>VETO</td>
<td>Veto messages</td>
</tr>
<tr class="row-odd"><td>VOTE</td>
<td>Bill votes</td>
</tr>
</tbody>
</table>
<p><strong>Examples</strong></p>
<p>Get a list of bills that have had status changes between January 1, 2014 12 AM and January 5, 2014 2 PM</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>(GET) /api/3/bills/updates/2014-01-01T00:00:00/2014-01-05T14:00:00?filter=status&amp;order=desc
</pre></div>
</div>
<p id="detailed-update-digests">To view the actual updates that have occurred on a bill use the following API</p>
<p><strong>Usage</strong></p>
<p>All updates on a specific bill</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="o">/</span><span class="n">api</span><span class="o">/</span><span class="mi">3</span><span class="o">/</span><span class="n">bills</span><span class="o">/</span><span class="p">{</span><span class="n">sessionYear</span><span class="p">}</span><span class="o">/</span><span class="p">{</span><span class="n">printNo</span><span class="p">}</span><span class="o">/</span><span class="n">updates</span><span class="o">/</span>
</pre></div>
</div>
<p>Updates on a specific bill from a given date/time.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="o">/</span><span class="n">api</span><span class="o">/</span><span class="mi">3</span><span class="o">/</span><span class="n">bills</span><span class="o">/</span><span class="p">{</span><span class="n">sessionYear</span><span class="p">}</span><span class="o">/</span><span class="p">{</span><span class="n">printNo</span><span class="p">}</span><span class="o">/</span><span class="n">updates</span><span class="o">/</span><span class="p">{</span><span class="n">fromDateTime</span><span class="p">}</span><span class="o">/</span>
</pre></div>
</div>
<p>Updates on a specific bill during a given date/time range.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="o">/</span><span class="n">api</span><span class="o">/</span><span class="mi">3</span><span class="o">/</span><span class="n">bills</span><span class="o">/</span><span class="p">{</span><span class="n">sessionYear</span><span class="p">}</span><span class="o">/</span><span class="p">{</span><span class="n">printNo</span><span class="p">}</span><span class="o">/</span><span class="n">updates</span><span class="o">/</span><span class="p">{</span><span class="n">fromDateTime</span><span class="p">}</span><span class="o">/</span><span class="p">{</span><span class="n">toDateTime</span><span class="p">}</span>
</pre></div>
</div>
<p><strong>Example</strong></p>
<p>Updates for S1234-2013 between December 1, 2014 and December 2, 2014</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="o">/</span><span class="n">api</span><span class="o">/</span><span class="mi">3</span><span class="o">/</span><span class="n">bills</span><span class="o">/</span><span class="mi">2013</span><span class="o">/</span><span class="n">S1234</span><span class="o">/</span><span class="n">updates</span><span class="o">/</span><span class="mi">2014</span><span class="o">-</span><span class="mi">12</span><span class="o">-</span><span class="mi">01</span><span class="n">T00</span><span class="p">:</span><span class="mi">00</span><span class="p">:</span><span class="mi">00</span><span class="o">/</span><span class="mi">2014</span><span class="o">-</span><span class="mi">12</span><span class="o">-</span><span class="mi">02</span><span class="n">T00</span><span class="p">:</span><span class="mi">00</span><span class="p">:</span><span class="mi">00</span>
</pre></div>
</div>
<p id="bill-update-digest-response"><strong>Response</strong></p>
<p>Sample response:</p>
<div class="highlight-javascript"><div class="highlight"><pre><span></span><span class="p">{</span>
    <span class="s2">&quot;success&quot;</span><span class="o">:</span> <span class="kc">true</span><span class="p">,</span>
    <span class="s2">&quot;message&quot;</span><span class="o">:</span> <span class="s2">&quot;&quot;</span><span class="p">,</span>
    <span class="s2">&quot;responseType&quot;</span><span class="o">:</span> <span class="s2">&quot;update-digest list&quot;</span><span class="p">,</span>
    <span class="s2">&quot;total&quot;</span><span class="o">:</span> <span class="mi">23</span><span class="p">,</span>
    <span class="s2">&quot;offsetStart&quot;</span><span class="o">:</span> <span class="mi">1</span><span class="p">,</span>
    <span class="s2">&quot;offsetEnd&quot;</span><span class="o">:</span> <span class="mi">23</span><span class="p">,</span>
    <span class="s2">&quot;limit&quot;</span><span class="o">:</span> <span class="mi">50</span><span class="p">,</span>
    <span class="s2">&quot;result&quot;</span><span class="o">:</span> <span class="p">{</span>
    <span class="s2">&quot;items&quot;</span><span class="o">:</span> <span class="p">[</span>
        <span class="p">{</span>
        <span class="s2">&quot;id&quot;</span><span class="o">:</span> <span class="p">{</span>
            <span class="s2">&quot;basePrintNo&quot;</span><span class="o">:</span> <span class="s2">&quot;S1234&quot;</span><span class="p">,</span>
            <span class="s2">&quot;session&quot;</span><span class="o">:</span> <span class="mi">2013</span>
        <span class="p">},</span>
        <span class="s2">&quot;sourceId&quot;</span><span class="o">:</span> <span class="s2">&quot;SOBI.D121220.T160535.TXT-0-BILL&quot;</span><span class="p">,</span>  <span class="c1">// The source file that made the change</span>
        <span class="s2">&quot;sourceDateTime&quot;</span><span class="o">:</span> <span class="s2">&quot;2012-12-20T16:05:35&quot;</span><span class="p">,</span>        <span class="c1">// The date of the source file</span>
        <span class="s2">&quot;processedDateTime&quot;</span><span class="o">:</span> <span class="s2">&quot;2014-12-13T13:40:08.564879&quot;</span><span class="p">,</span>
        <span class="s2">&quot;action&quot;</span><span class="o">:</span> <span class="s2">&quot;INSERT&quot;</span><span class="p">,</span>                              <span class="c1">// Database operation</span>
        <span class="s2">&quot;scope&quot;</span><span class="o">:</span> <span class="s2">&quot;Bill&quot;</span><span class="p">,</span>                                 <span class="c1">// Type of data modified</span>
        <span class="s2">&quot;fields&quot;</span><span class="o">:</span> <span class="p">{</span>                                      <span class="c1">// Database fields that were updated</span>
            <span class="s2">&quot;summary&quot;</span><span class="o">:</span> <span class="s2">&quot;&quot;</span><span class="p">,</span>
            <span class="s2">&quot;statusDate&quot;</span><span class="o">:</span> <span class="s2">&quot;2013-01-09&quot;</span><span class="p">,</span>
            <span class="s2">&quot;publishedDateTime&quot;</span><span class="o">:</span> <span class="s2">&quot;2012-12-20 16:05:35&quot;</span><span class="p">,</span>
            <span class="s2">&quot;committeeChamber&quot;</span><span class="o">:</span> <span class="s2">&quot;senate&quot;</span><span class="p">,</span>
            <span class="s2">&quot;programInfo&quot;</span><span class="o">:</span> <span class="kc">null</span><span class="p">,</span>
            <span class="s2">&quot;subBillPrintNo&quot;</span><span class="o">:</span> <span class="kc">null</span><span class="p">,</span>
            <span class="s2">&quot;createdDateTime&quot;</span><span class="o">:</span> <span class="s2">&quot;2014-12-13 13:40:08.564879&quot;</span><span class="p">,</span>
            <span class="s2">&quot;title&quot;</span><span class="o">:</span> <span class="s2">&quot;Creates the office of the taxpayer advocate&quot;</span><span class="p">,</span>
            <span class="s2">&quot;programInfoNum&quot;</span><span class="o">:</span> <span class="kc">null</span><span class="p">,</span>
            <span class="s2">&quot;billCalNo&quot;</span><span class="o">:</span> <span class="kc">null</span><span class="p">,</span>
            <span class="s2">&quot;activeYear&quot;</span><span class="o">:</span> <span class="s2">&quot;2013&quot;</span><span class="p">,</span>
            <span class="s2">&quot;committeeName&quot;</span><span class="o">:</span> <span class="s2">&quot;INVESTIGATIONS AND GOVERNMENT OPERATIONS&quot;</span><span class="p">,</span>
            <span class="s2">&quot;activeVersion&quot;</span><span class="o">:</span> <span class="s2">&quot; &quot;</span><span class="p">,</span>
            <span class="s2">&quot;status&quot;</span><span class="o">:</span> <span class="s2">&quot;IN_SENATE_COMM&quot;</span>
        <span class="p">}</span>
    <span class="p">},</span>
    <span class="p">...</span> <span class="p">(</span><span class="nx">truncated</span><span class="p">)</span>
</pre></div>
</div>
</div>
</div>


           </div>
           <div class="articleComments">
            
           </div>
          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
        <a href="calendars.html" class="btn btn-neutral float-right" title="Senate Calendar API" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
      
      
        <a href="index.html" class="btn btn-neutral" title="Open Legislation v2.0 API Docs" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
      
    </div>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2014, NY State Senate Technology Services.

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  

    <script type="text/javascript">
        var DOCUMENTATION_OPTIONS = {
            URL_ROOT:'./',
            VERSION:'2.0-alpha',
            COLLAPSE_INDEX:false,
            FILE_SUFFIX:'.html',
            HAS_SOURCE:  true,
            SOURCELINK_SUFFIX: '.txt'
        };
    </script>
      <script type="text/javascript" src="_static/jquery.js"></script>
      <script type="text/javascript" src="_static/underscore.js"></script>
      <script type="text/javascript" src="_static/doctools.js"></script>

  

  
  
    <script type="text/javascript" src="_static/js/theme.js"></script>
  

  
  
  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.StickyNav.enable();
      });
  </script>
   

</body>
</html>